//
//  YJChatTableView.m
//  YJB
//
//  Created by YJB on 16/10/10.
//  Copyright © 2016年 YJB. All rights reserved.
//

#import "YJChatTableView.h"

@implementation YJChatTableView

- (void)setContentSize:(CGSize)contentSize
{
    if (_isLoadMoreMessage)
    {
        if (!CGSizeEqualToSize(contentSize, CGSizeZero))
        {
            CGPoint offset = self.contentOffset;
            offset.y += contentSize.height - self.contentSize.height;
            self.contentOffset = offset;
        }   
    }
    [super setContentSize:contentSize];
}

-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    [super touchesBegan:touches withEvent:event];
    
    if (self.superview)
    {
        [self.nextResponder touchesBegan:touches withEvent:event];
    }
}

@end
